<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>ArduinoUnit 2.0: src/ArduinoUnit.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ArduinoUnit 2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ArduinoUnit.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_arduino_unit_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;Print.h&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#if ARDUINO &gt;= 100 &amp;&amp; ARDUINO &lt; 103</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#undef F</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#undef PSTR</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &amp;__c[0];}))</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#define F(string_literal) (reinterpret_cast&lt;const __FlashStringHelper *&gt;(PSTR(string_literal)))</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#if defined(__GNUC__) &amp;&amp; (__GNUC__*100 + __GNUC_MINOR__ &lt; 407)</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor"></span><span class="comment">// Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifdef PROGMEM</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#undef PROGMEM</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define PROGMEM __attribute__((section(&quot;.progmem.data&quot;)))</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;utility/FakeStream.h&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;utility/MemoryFree.h&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a493c510d3c14bd7e0c0238128c5aa224">   33</a></span>&#160;<span class="preprocessor">#define ARDUINO_UNIT_MAJOR_VERSION 2</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a13d483630166de40ddac19e79d4f9f38">   36</a></span>&#160;<span class="preprocessor">#define ARDUINO_UNIT_MINOR_VERSION 0</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">// These define what you want for output from tests.</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ac1041a1c1013e91e58398902e76ed955">   51</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_TESTS_SUMMARY     0x01</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ade634cc9e178cabccf130ffd0dfc1db9">   62</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_TESTS_FAILED      0x02</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#af1ccd514e542a66532cebb40e6bfcfde">   73</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_TESTS_PASSED      0x04</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a9699425f4ed5ac2433dac29139c95508">   85</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_TESTS_SKIPPED     0x08</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a05c2ef95b9d1d0dad013969163c8e3cd">   97</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_TESTS_ALL         0x0F</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a5863a706c9a4beb1e762f21500c89ed1">  107</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_ASSERTIONS_FAILED 0x10</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a669e594b050f6679bd55dbc5703f780b">  117</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_ASSERTIONS_PASSED 0x20</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a971a1072bd60f734544fba6405348b98">  127</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_ASSERTIONS_ALL    0x30</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a2c97afa819205922cdb858460c8e61c9">  132</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_ALL               0x3F</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a311f2d8e95e772ae0a07bf9849baca4d">  137</a></span>&#160;<span class="preprocessor">#define  TEST_VERBOSITY_NONE              0x00</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="preprocessor">#ifndef TEST_MAX_VERBOSITY</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a59a891cb5163a9ed52a47fe580c70609">  146</a></span>&#160;<span class="preprocessor">#define TEST_MAX_VERBOSITY TEST_VERBOSITY_ALL</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#af0516d123ba14750dec20e1f9ff6e6cc">  162</a></span>&#160;<span class="preprocessor">#define TEST_VERBOSITY_EXISTS(OF) ((TEST_MAX_VERBOSITY &amp; TEST_VERBOSITY_ ## OF) != 0)</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ae45f4c75041a5f8020bffc91559fac00">  182</a></span>&#160;<span class="preprocessor">#define TEST_VERBOSITY_ALLOWED(OF) (TEST_VERBOSITY_EXISTS(OF) &amp;&amp; ((Test::max_verbosity &amp; TEST_VERBOSITY_ ## OF) != 0))</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a05f1f4f8e6379968993f4d300a973bd8">  189</a></span>&#160;<span class="preprocessor">#define TEST_VERBOSITY_REQUIRED(OF) (TEST_VERBOSITY_ALLOWED(OF) &amp;&amp; ((Test::min_verbosity &amp; TEST_VERBOSITY_ ## OF) != 0))</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a1a1be213fc98a7d7d4a1e30c9f921ea4">  196</a></span>&#160;<span class="preprocessor">#define TEST_VERBOSITY(OF) (TEST_VERBOSITY_ALLOWED(OF) &amp;&amp; (((Test::min_verbosity &amp; TEST_VERBOSITY_ ## OF ) != 0) || (((Test::current != 0) &amp;&amp; ((Test::current-&gt;verbosity &amp; TEST_VERBOSITY_ ## OF) != 0)))))</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="code" href="class_test.html">  279</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_test.html">Test</a></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;{</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  <span class="comment">// allows for both ram/progmem based names</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <span class="keyword">class </span>String : <span class="keyword">public</span> Printable {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keyword">const</span> uint32_t data;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    String(<span class="keyword">const</span> <span class="keywordtype">char</span> *_data);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    String(<span class="keyword">const</span> __FlashStringHelper *_data);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keywordtype">void</span> read(<span class="keywordtype">void</span> *destination, uint16_t offset, uint8_t length) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    uint16_t length() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    int8_t compare(<span class="keyword">const</span> Test::String &amp;to) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordtype">size_t</span> printTo(Print &amp;p) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordtype">bool</span> matches(<span class="keyword">const</span> <span class="keywordtype">char</span> *pattern) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  };</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  <span class="comment">// linked list structure for active tests</span></div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  <span class="keyword">static</span> <a class="code" href="class_test.html">Test</a>* root;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  <a class="code" href="class_test.html">Test</a> *next;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  <span class="comment">// static statistics for tests</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;  <span class="keyword">static</span> uint16_t passed;</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  <span class="keyword">static</span> uint16_t failed;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;  <span class="keyword">static</span> uint16_t skipped;</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  <span class="keyword">static</span> uint16_t count;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;  <span class="keywordtype">void</span> resolve();</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="keywordtype">void</span> <span class="keyword">remove</span>();</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;  <span class="keywordtype">void</span> insert();</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160; <span class="keyword">public</span>:  </div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="code" href="class_test.html#aad3dc21628f5210b9ebdf843eb2b2ae0">  315</a></span>&#160;  <span class="keyword">static</span> uint8_t <a class="code" href="class_test.html#aad3dc21628f5210b9ebdf843eb2b2ae0">max_verbosity</a>;</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div>
<div class="line"><a name="l00321"></a><span class="lineno"><a class="code" href="class_test.html#a1ff0e4cf27254c988233880fff9e6c6d">  321</a></span>&#160;  <span class="keyword">static</span> uint8_t <a class="code" href="class_test.html#a1ff0e4cf27254c988233880fff9e6c6d">min_verbosity</a>;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;  <span class="keyword">static</span> <span class="keyword">inline</span> uint16_t getCurrentPassed() { <span class="keywordflow">return</span> passed; }</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;  <span class="keyword">static</span> <span class="keyword">inline</span> uint16_t getCurrentSkipped() { <span class="keywordflow">return</span> skipped; }</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;  <span class="keyword">static</span> <span class="keyword">inline</span> uint16_t getCurrentFailed() { <span class="keywordflow">return</span> failed; }</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;  <span class="keyword">static</span> uint16_t getCurrentCount() { <span class="keywordflow">return</span> count; }</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div>
<div class="line"><a name="l00330"></a><span class="lineno"><a class="code" href="class_test.html#a73b64ff82076551c6a66f17bed82c1b4">  330</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_test.html#a73b64ff82076551c6a66f17bed82c1b4">UNSETUP</a>;</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div>
<div class="line"><a name="l00334"></a><span class="lineno"><a class="code" href="class_test.html#ad547575fc6e8ad71bb39542c1abeb7fd">  334</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_test.html#ad547575fc6e8ad71bb39542c1abeb7fd">LOOPING</a>;</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div>
<div class="line"><a name="l00340"></a><span class="lineno"><a class="code" href="class_test.html#af7ee7b197c214e110e13537bc0b277e2">  340</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_test.html#af7ee7b197c214e110e13537bc0b277e2">DONE_SKIP</a>;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;</div>
<div class="line"><a name="l00343"></a><span class="lineno"><a class="code" href="class_test.html#ab1a131191af040400d33ea8f8b2c25af">  343</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_test.html#ab1a131191af040400d33ea8f8b2c25af">DONE_PASS</a>;</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;</div>
<div class="line"><a name="l00346"></a><span class="lineno"><a class="code" href="class_test.html#a4ad0055670d3ae4babadc094002c17fd">  346</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_test.html#a4ad0055670d3ae4babadc094002c17fd">DONE_FAIL</a>;</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div>
<div class="line"><a name="l00364"></a><span class="lineno"><a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">  364</a></span>&#160;  <span class="keyword">static</span> Print *<a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div>
<div class="line"><a name="l00371"></a><span class="lineno"><a class="code" href="class_test.html#a208f71a142dbf9a369cb0f345bc924dc">  371</a></span>&#160;  uint8_t <a class="code" href="class_test.html#a208f71a142dbf9a369cb0f345bc924dc">state</a>;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div>
<div class="line"><a name="l00378"></a><span class="lineno"><a class="code" href="class_test.html#ab33c60d07c2338204a0bafe40f995177">  378</a></span>&#160;  <span class="keyword">static</span> <a class="code" href="class_test.html">Test</a>* <a class="code" href="class_test.html#ab33c60d07c2338204a0bafe40f995177">current</a>;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div>
<div class="line"><a name="l00381"></a><span class="lineno"><a class="code" href="class_test.html#acff24a84a14b606d01913a4a701ca821">  381</a></span>&#160;  String <a class="code" href="class_test.html#acff24a84a14b606d01913a4a701ca821">name</a>;</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;</div>
<div class="line"><a name="l00398"></a><span class="lineno"><a class="code" href="class_test.html#aa0489f064ae55a20229646a584110a39">  398</a></span>&#160;  uint8_t <a class="code" href="class_test.html#aa0489f064ae55a20229646a584110a39">verbosity</a>;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass</a>();</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail</a>();</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip</a>(); </div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup</a>();</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop</a>() = 0;</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_test.html#acfe763aab53dbecab02f473b93536347">include</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pattern);</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_test.html#a00269bd7c55b1c93477be06174280b04">exclude</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pattern);</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_test.html#abb64a8b970de8b2422b9f56cd8719ca4">run</a>();</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;  <span class="comment">// Construct a test with a given name and verbosity level</span></div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;  <a class="code" href="class_test.html">Test</a>(<span class="keyword">const</span> __FlashStringHelper *_name, uint8_t _verbosity = <a class="code" href="_arduino_unit_8h.html#a05c2ef95b9d1d0dad013969163c8e3cd" title="Verbosity mask for resolved (skip, pass, or fail) test summary (default).">TEST_VERBOSITY_TESTS_ALL</a>|<a class="code" href="_arduino_unit_8h.html#a5863a706c9a4beb1e762f21500c89ed1" title="Verbosity mask for failed assertions (default).">TEST_VERBOSITY_ASSERTIONS_FAILED</a>);</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;  <a class="code" href="class_test.html">Test</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *_name, uint8_t _verbosity = <a class="code" href="_arduino_unit_8h.html#a05c2ef95b9d1d0dad013969163c8e3cd" title="Verbosity mask for resolved (skip, pass, or fail) test summary (default).">TEST_VERBOSITY_TESTS_ALL</a>|<a class="code" href="_arduino_unit_8h.html#a5863a706c9a4beb1e762f21500c89ed1" title="Verbosity mask for failed assertions (default).">TEST_VERBOSITY_ASSERTIONS_FAILED</a>);</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;  <span class="keyword">virtual</span> ~<a class="code" href="class_test.html">Test</a>();</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> assertion(<span class="keyword">const</span> __FlashStringHelper *file, uint16_t line, <span class="keyword">const</span> __FlashStringHelper *lhss, <span class="keyword">const</span> T&amp; lhs, <span class="keyword">const</span> __FlashStringHelper *ops, <span class="keywordtype">bool</span> (*op)(<span class="keyword">const</span> T&amp; lhs, <span class="keyword">const</span> T&amp; rhs), <span class="keyword">const</span> __FlashStringHelper *rhss, <span class="keyword">const</span> T&amp; rhs) {</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    <span class="keywordtype">bool</span> ok = op(lhs,rhs);</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <span class="keywordtype">bool</span> output = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    <span class="keywordflow">if</span> ((!ok) &amp;&amp; (<a class="code" href="class_test.html#ab33c60d07c2338204a0bafe40f995177">current</a> != 0)) <a class="code" href="class_test.html#ab33c60d07c2338204a0bafe40f995177">current</a>-&gt;<a class="code" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail</a>();</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;<span class="preprocessor">#if TEST_VERBOSITY_EXISTS(ASSERTIONS_PASSED)</span></div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">if</span> (ok &amp;&amp; <a class="code" href="_arduino_unit_8h.html#a1a1be213fc98a7d7d4a1e30c9f921ea4" title="Check if given verbosity is appropriate. (advanced)">TEST_VERBOSITY</a>(ASSERTIONS_PASSED)) {</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;      output = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    }</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;<span class="preprocessor">#if TEST_VERBOSITY_EXISTS(ASSERTIONS_FAILED)</span></div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">if</span> ((!ok) &amp;&amp; <a class="code" href="_arduino_unit_8h.html#a1a1be213fc98a7d7d4a1e30c9f921ea4" title="Check if given verbosity is appropriate. (advanced)">TEST_VERBOSITY</a>(ASSERTIONS_FAILED)) {</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;      output = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    }</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="preprocessor">#if TEST_VERBOSITY_EXISTS(ASSERTIONS_FAILED) || TEST_VERBOSITY_EXISTS(ASSERTIONS_PASSED)</span></div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">if</span> (output) {</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(file);</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot;:&quot;</span>));</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(line);</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot;:1: &quot;</span>));</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(ok ? F(<span class="stringliteral">&quot;pass&quot;</span>) : F(<span class="stringliteral">&quot;fail&quot;</span>));</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot; assert (&quot;</span>));</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(lhss);</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot;=&quot;</span>));</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(lhs);</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot;) &quot;</span>));</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(ops);</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot; (&quot;</span>));</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(rhss);</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot;=&quot;</span>));</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(rhs);</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;print(F(<span class="stringliteral">&quot;)&quot;</span>));</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;      <a class="code" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a>-&gt;println();</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    }</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> ok;</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;  }</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;};</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;</div>
<div class="line"><a name="l00528"></a><span class="lineno"><a class="code" href="class_test_once.html">  528</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_test_once.html">TestOnce</a> : <span class="keyword">public</span> <a class="code" href="class_test.html">Test</a> {</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;  <a class="code" href="class_test_once.html">TestOnce</a>(<span class="keyword">const</span> __FlashStringHelper *<a class="code" href="class_test.html#acff24a84a14b606d01913a4a701ca821">name</a>);</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;  <a class="code" href="class_test_once.html">TestOnce</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name);</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_test_once.html#a602e32762fb5bf103bb1371a3dc12eed">loop</a>();</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> once() = 0;</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;};</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00538"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a3f91cb6a2b0c3addbfbb188b3673b6ae">  538</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_arduino_unit_8h.html#a3f91cb6a2b0c3addbfbb188b3673b6ae">isEqual</a>(<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b) { <span class="keywordflow">return</span> a==b; }</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00542"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a449019a143b0176b428f1153a981278b">  542</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_arduino_unit_8h.html#a449019a143b0176b428f1153a981278b">isNotEqual</a>(<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b) { <span class="keywordflow">return</span> !(a==b); }</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00546"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a81ca3a62fb2d8780c6240695334b9937">  546</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_arduino_unit_8h.html#a81ca3a62fb2d8780c6240695334b9937">isLess</a>(<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b) { <span class="keywordflow">return</span> a &lt; b; }</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00550"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a762aec809a81cf3784d3ad5ac5f506eb">  550</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_arduino_unit_8h.html#a762aec809a81cf3784d3ad5ac5f506eb">isMore</a>(<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b) { <span class="keywordflow">return</span> b &lt; a; }</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00554"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a349cc407457cbdd927e04f0a8c41cc1f">  554</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_arduino_unit_8h.html#a349cc407457cbdd927e04f0a8c41cc1f">isLessOrEqual</a>(<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b) { <span class="keywordflow">return</span> !(b&lt;a); }</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00558"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a89f3a5051fc50c9562b137dedcb182f7">  558</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_arduino_unit_8h.html#a89f3a5051fc50c9562b137dedcb182f7">isMoreOrEqual</a>(<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b) { <span class="keywordflow">return</span> !(a&lt;b); }</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">bool</span> isLess&lt;const char*&gt;(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;b);</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">bool</span> isLessOrEqual&lt;const char*&gt;(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;b);</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">bool</span> isEqual&lt;const char*&gt;(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;b);</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">bool</span> isNotEqual&lt;const char*&gt;(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;b);</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">bool</span> isMore&lt;const char*&gt;(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;b);</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">bool</span> isMoreOrEqual&lt;const char*&gt;(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> &amp;b);</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;</div>
<div class="line"><a name="l00581"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a191e80e8763446a0e725a8e58fb3380b">  581</a></span>&#160;<span class="preprocessor">#define test(name) struct test_ ## name : TestOnce { test_ ## name() : TestOnce(F(#name)) {}; void once(); } test_ ## name ## _instance; void test_ ## name :: once() </span></div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00587"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a5aec0442c0e47ce1c485be5baffa9c36">  587</a></span>&#160;<span class="preprocessor">#define externTest(name) struct test_ ## name : TestOnce { test_ ## name(); void once(); }; extern test_##name test_##name##_instance</span></div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00594"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ae8c6ee99d95c8b788bf896974172a7e5">  594</a></span>&#160;<span class="preprocessor">#define testing(name) struct test_ ## name : Test { test_ ## name() : Test(F(#name)) {}; void loop(); } test_ ## name ## _instance; void test_ ## name :: loop() </span></div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00599"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ae3759a8b15c8390bf29e68da59161440">  599</a></span>&#160;<span class="preprocessor">#define externTesting(name) struct test_ ## name : Test { test_ ## name(); void loop(); }; extern test_##name test_##name##_instance</span></div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;<span class="comment">// helper define for the operators below</span></div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;<span class="preprocessor">#define assertOp(arg1,op,op_name,arg2) if (!Test::assertion&lt;typeof(arg2)&gt;(F(__FILE__),__LINE__,F(#arg1),(arg1),F(op_name),op,F(#arg2),(arg2))) return;</span></div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00605"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a8ef465d33a5a36963dd24190de055d2d">  605</a></span>&#160;<span class="preprocessor">#define assertEqual(arg1,arg2)       assertOp(arg1,isEqual,&quot;==&quot;,arg2)</span></div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00608"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a8b6e553f85b2a168388016b5afbb0939">  608</a></span>&#160;<span class="preprocessor">#define assertNotEqual(arg1,arg2)    assertOp(arg1,isNotEqual,&quot;!=&quot;,arg2)</span></div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00611"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a2b58bc2c68f19b93996750d5e576b541">  611</a></span>&#160;<span class="preprocessor">#define assertLess(arg1,arg2)        assertOp(arg1,isLess,&quot;&lt;&quot;,arg2)</span></div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00614"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ac883a9a1e4f133b441b11235315f43ab">  614</a></span>&#160;<span class="preprocessor">#define assertMore(arg1,arg2)        assertOp(arg1,isMore,&quot;&gt;&quot;,arg2)</span></div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00617"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a0d297d225f9978905e992fe41975cb5f">  617</a></span>&#160;<span class="preprocessor">#define assertLessOrEqual(arg1,arg2) assertOp(arg1,isLessOrEqual,&quot;&lt;=&quot;,arg2)</span></div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00620"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a4e12af47bf69ae0007db97421cf12fdd">  620</a></span>&#160;<span class="preprocessor">#define assertMoreOrEqual(arg1,arg2) assertOp(arg1,isMoreOrEqual,&quot;&gt;=&quot;,arg2)</span></div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00623"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#abf5260a4376989bd11cbbbb86843e381">  623</a></span>&#160;<span class="preprocessor">#define assertTrue(arg) assertEqual(arg,true)</span></div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00626"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ac2a6771f31162d3ce28d3ce1d3aa8020">  626</a></span>&#160;<span class="preprocessor">#define assertFalse(arg) assertEqual(arg,false)</span></div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;<span class="preprocessor">#define checkTestDone(name) (test_##name##_instance.state &gt;= Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00631"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#aec1a7820643e6e2949915ac62a73239c">  631</a></span>&#160;<span class="preprocessor">#define checkTestNotDone(name) (test_##name##_instance.state &lt; Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00634"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a5b2c79b1cb2a807e6acd6074c1921305">  634</a></span>&#160;<span class="preprocessor">#define checkTestPass(name) (test_##name##_instance.state == Test::DONE_PASS)</span></div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00637"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#aca7d59a28d1387ca2e32feee45568ada">  637</a></span>&#160;<span class="preprocessor">#define checkTestNotPass(name) (test_##name##_instance.state != Test::DONE_PASS)</span></div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00640"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#aa3996acf00f54070d06c7df2cf0e0d6b">  640</a></span>&#160;<span class="preprocessor">#define checkTestFail(name) (test_##name##_instance.state == Test::DONE_FAIL)</span></div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00643"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a7c739c64bbd3408674c88ec2eb815947">  643</a></span>&#160;<span class="preprocessor">#define checkTestNotFail(name) (test_##name##_instance.state != Test::DONE_FAIL)</span></div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00646"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a084f35bf7746d6e804336bba4f1fb7bf">  646</a></span>&#160;<span class="preprocessor">#define checkTestSkip(name) (test_##name##_instance.state == Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00649"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ac68183f44430293594fb5425544f5da5">  649</a></span>&#160;<span class="preprocessor">#define checkTestNotSkip(name) (test_##name##_instance.state != Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00652"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#aae1db15fc5598a9df577abc10a9f0046">  652</a></span>&#160;<span class="preprocessor">#define assertTestDone(name) assertMoreOrEqual(test_##name##_instance.state,Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00654"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a3b30928df36bf45d557c771c6e53fb1f">  654</a></span>&#160;<span class="preprocessor">#define assertTestNotDone(name) assertLess(test_##name##_instance.state,Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00657"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a8a163b115adb11159acfcae4dfa60033">  657</a></span>&#160;<span class="preprocessor">#define assertTestPass(name) assertEqual(test_##name##_instance.state,Test::DONE_PASS)</span></div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00660"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a2b0df80ae367ac8f9cd1d33958dba693">  660</a></span>&#160;<span class="preprocessor">#define assertTestNotPass(name) assertNotEqual(test_##name##_instance.state,Test::DONE_PASS)</span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00663"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a4a66b7d1fa653744cffa141d91eaedc8">  663</a></span>&#160;<span class="preprocessor">#define assertTestFail(name) assertEqual(test_##name##_instance.state,Test::DONE_FAIL)</span></div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00666"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a9da067a09da78934b7356e12fcd6d594">  666</a></span>&#160;<span class="preprocessor">#define assertTestNotFail(name) assertNotEqual(test_##name##_instance.state,Test::DONE_FAIL)</span></div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00669"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#ad6d04bfb8589206f0d44229a5c0e178f">  669</a></span>&#160;<span class="preprocessor">#define assertTestSkip(name) assertEqual(test_##name##_instance.state,Test::DONE_SKIP)</span></div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00672"></a><span class="lineno"><a class="code" href="_arduino_unit_8h.html#a439c30d54d91aed8c833b2231c78a8ac">  672</a></span>&#160;<span class="preprocessor">#define assertTestNotSkip(name) assertNotEqual(test_##name##_instance.state,Test::DONE_SKIP)</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 12 2013 17:50:17 for ArduinoUnit 2.0 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
